/**
 * 解析 xlsx 文件
 * @type {{parse, build}|*}
 */
var xlsx = require('node-xlsx').default;
var fs = require('fs');



/**
 * Parse a buffer
 * @type {*|void|number|any}
 * 拿到的是数组对象文件
 */
const workSheetsFromBuffer = xlsx.parse(fs.readFileSync(`${__dirname}/text2.xlsx`));
console.log(workSheetsFromBuffer[0]);


// Parse a file
// const workSheetsFromFile = xlsx.parse(`${__dirname}/text2.xlsx`);
// console.log(workSheetsFromFile);